//
//  RBNetworkTool.h
//  RMMaterialRed
//
//  Created by RB on 2024/3/6.
//

#import <Foundation/Foundation.h>
#import "RBHttpNetworkHelper.h"

NS_ASSUME_NONNULL_BEGIN

typedef void (^RBHttpRequestSuccess)(id responseObject);
typedef void (^RBHttpRequestError)(id responseObject);
typedef void (^RBHttpRequestFailed)(NSError *error);
typedef void (^RBHttpRequestCache)(id responseCache);

@interface RBNetworkTool : NSObject
///GET请求,无缓存
+ (__kindof NSURLSessionTask *)GET:(NSString *)URL
                        parameters:(id)parameters
                           success:(RBHttpRequestSuccess)success
                             error:(RBHttpRequestError)error
                           failure:(RBHttpRequestFailed)failure;
///POST请求,无缓存
+ (__kindof NSURLSessionTask *)POST:(NSString *)URL
                         parameters:(id)parameters
                            success:(RBHttpRequestSuccess)success
                              error:(RBHttpRequestError)error
                            failure:(RBHttpRequestFailed)failure;
@end

NS_ASSUME_NONNULL_END
